package adv329;

import java.util.Calendar;
import java.util.Date;

/**
 * @author oldliu
 * @since 1.0
 */
public class CalTest {
    public static void main(String[] args) {
        Calendar c=Calendar.getInstance();//创建对象
        //Date date = c.getTime();
        int year = c.get(Calendar.YEAR);
        int month=c.get(Calendar.MONTH);
        int days=c.get(Calendar.DAY_OF_YEAR);
        int day=c.get(Calendar.DAY_OF_MONTH);
        System.out.println("今天是本月的第几天："+day);
        int xingqi=c.get(Calendar.DAY_OF_WEEK);
        int hours=c.get(Calendar.HOUR_OF_DAY);//24时
        int hours2=c.get(Calendar.HOUR);//12时

        System.out.println("今天是周几："+xingqi);
        System.out.println(year);
        System.out.println(month);

        System.out.println("今天是今年第多少天:"+days);

        int wy=c.get(Calendar.WEEK_OF_YEAR);
        System.out.println("本周是今年的第几周:"+wy);
    }
}
